/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.coupon.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ykht.proj.common.core.util.R;
import com.ykht.proj.coupon.entity.*;
import com.ykht.proj.coupon.vo.*;

import java.util.Collection;
import java.util.List;

/**
 * 优惠券表
 *
 * @author proj code generator
 * @date 2020-11-16 17:00:20
 */
public interface CnCouponService extends IService<CnCoupon> {

	R upOrLow(Long id);

	R findPage(Page page, CnCouponVo cnCouponVo);

	R getShop(Long brandId);

	R insertCnCoupon(CnCouponVo cnCouponVo);




	R getBrand();

	List<RecommendCouponVo> recommendCouponList(List<CnBrand> brandList, CnShop cnShop);

	R receiveCoupon(Long id, CnCouponLog cnCouponLog, Long shareId);

	/**
	 * C端（用户） 领劵中心列表
	 *
	 * @return
	 */
	List<CnCouponDetailResp> getCouponList();

	/**
	 * C端（用户） 领劵中心列表的下拉
	 *
	 * @param ids
	 * @return
	 */
	List<CnCouponDetailResp> getCouponListPage(List<Long> ids);

	/**
	 * 获取全部 爆款优惠 指定的数量
	 *
	 * @param number 获取几条数量
	 * @param userId 登录人ID
	 * @return
	 */
	List<CnCouponDetailResp> getLoginWholeHotCouponList(Integer number, List<Long> brandIdList, Long userId,List<Long> ids);

	/**
	 * 获取全部 爆款优惠 指定的数量
	 *
	 * @param number 获取几条数量
	 * @return
	 */
	List<CnCouponDetailResp> getWholeHotCouponList(Integer number);


	/**
	 * 该门店下的优惠券
	 *
	 * @param id
	 * @param brandId
	 * @return
	 */
	List<CnCouponReceiveVo> couponListByShopIdAndBrandId(Long id, Long brandId);

	R receiveCouponByIds(String ids, Long waiterId, Long articleId, Integer addCouponFlag, Long shareId);

	R checkCouponAndPerson(List<String> list);

	Object getCouponByShopName(CnCouponVo cnCouponVo);

	Page<WqqfCouponVo> wqqf(Page<WqqfCouponVo> page, WqqfCoupon req);

    List<ShopHasCouponCount> shopHasCouponCount(Collection<Long> c);
}
